﻿using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace SZ.Mech
{
    public class HediffCompProperties_Loop : HediffCompProperties
    {
        public float LoopSeverity;
        public HediffCompProperties_Loop()
        {
            this.compClass = typeof(HediffComp_Loop);
        }
    }

    public class HediffComp_Loop : HediffComp
    {
        public HediffCompProperties_Loop Props
        {
            get
            {
                return (HediffCompProperties_Loop)props;
            }
        }


        public override void CompPostTick(ref float severityAdjustment)
        {
            base.CompPostTick(ref severityAdjustment);
            if (severityAdjustment < Props.LoopSeverity)
            {
                severityAdjustment = parent.def.maxSeverity;
            }
        }
    }
}